package com.george.es.controller.api.file;

import com.george.es.model.dto.FileDto;
import com.george.es.util.ReadFileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *
 * </p>
 *
 * @author GeorgeChan 2019/6/20 9:24
 * @version 1.0
 * @since jdk1.8
 */
@RestController
@RequestMapping("/file")
public class FileAnalysisController {
    private static final Logger LOGGER = LoggerFactory.getLogger(FileAnalysisController.class);

    @PostMapping("/analysis")
    public FileDto analysisFile(@RequestParam("path") String path) {
        FileDto fileDto = ReadFileUtils.readPpt(path);
        return fileDto;
    }
}
